<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<html>
<head>
  <title>添加／修改停车场信息</title>
</head>
<body>
<div class="row">
  <div class="col-lg-12">
    <div class="breadcrumbs fixed">
      <ul class="breadcrumb">
        <li>
          <a href="/backend/dashboard">首页</a>
        </li>
        <li class="active">添加／修改停车场信息</li>
      </ul>
    </div>
  <div class="park_header">
    <div class="portlet">
      <div class="portlet-heading dark">
        <div class="portlet-title">
          <h4>添加／修改停车场信息</h4>
        </div>
      </div>
      <div class="portlet-body">
        <form:form class="form-horizontal" method="post" action="park" commandName="parkFormDto">
          <input name="guid" type="hidden" value="${parkFormDto.guid}">
          <div class="wizard">
            <div class="step-content">
              <div class="step-pane active" id="step1">

                <table width="100%">
                  <tbody><tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">名称:<span class="necessary">*</span></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                              <input class="form-control" name="name" value="${parkFormDto.name}" type="text"/>
                            </div>
                          <form:errors path="name" cssClass="error"/>
                        </div>
                      </div>
                    </td>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">城市:<span class="necessary">*</span></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                              <select class="form-control selectpicker" name="cityGuid">
                                <c:forEach items="${cities}" var="city">
                                  <option value="${city.guid}"
                                    <c:if test="${city.guid eq parkFormDto.cityGuid}">selected="selected" </c:if>>${city.name}
                                  </option>
                                </c:forEach>
                              </select>
                          </div>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">详细地址:<span class="necessary">*</span></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                              <input class="form-control"  value="${parkFormDto.address}" type="text" autocomplete="off" name="address"/>
                            </div>
                            <form:errors path="address" cssClass="error"/>
                        </div>
                      </div>
                    </td>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">坐标(纬度/经度):<span class="necessary">*</span></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                              <input value="${parkFormDto.lat}" type="text" name="lat" class="lat_lng"/>/
                              <input value="${parkFormDto.lng}" type="text" name="lng" class="lat_lng"/>
                          </div>
                          <form:errors path="lat" cssClass="error"/>
                          <form:errors path="lng" cssClass="error"/>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">车位数:<span class="necessary">*</span></label>
                        <div class="col-sm-8">
                            <div class="clearfix">
                              <input class="form-control" value="${parkFormDto.stallNumber}" type="text" autocomplete="off" name="stallNumber"/>
                            </div>
                            <form:errors path="stallNumber" cssClass="error"/>
                          </div>
                      </div>
                    </td>

                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">预定说明:<span class="necessary">*</span></label>

                        <div class="col-sm-8">
                          <div class="clearfix">
                              <textarea class="form-control" autocomplete="off" name="orderNote">${parkFormDto.orderNote}</textarea>
                            </div>
                          <form:errors path="queueNote" cssClass="error"/>
                        </div>
                      </div>
                    </td>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">排队说明:<span class="necessary">*</span></label>

                        <div class="col-sm-8">
                          <div class="clearfix">
                            <textarea class="form-control" autocomplete="off" name="queueNote">${parkFormDto.queueNote}</textarea>
                          </div>
                          <form:errors path="queueNote" cssClass="error"/>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">价格:<span class="necessary">*</span></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                            <input value="${parkFormDto.startPrice}" type="text" autocomplete="off" name="startPrice" style="width:120px;"/> 小时
                            <input value="${parkFormDto.unitPrice}" type="text" autocomplete="off" name="unitPrice" style="width:120px;"/> 元
                          </div>
                          <form:errors path="startPrice" cssClass="error"/>
                          <form:errors path="unitPrice" cssClass="error"/>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label">价格描述:<span class="necessary">*</span></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                            <input class="form-control" value="" type="text" autocomplete="off" />
                          </div>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label"></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                            <input class="form-control" value="" type="text" autocomplete="off" />
                          </div>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label"></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                            <input class="form-control" value="" type="text" autocomplete="off" />
                          </div>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label"></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                            <input class="form-control" value="" type="text" autocomplete="off" />
                          </div>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <div class="form-group">
                        <label class="col-sm-4 control-label"></label>
                        <div class="col-sm-8">
                          <div class="clearfix">
                            <input class="form-control" value="" type="text" autocomplete="off" />
                          </div>
                        </div>
                      </div>
                    </td>
                  </tr>
                  </tbody>
                </table>
              </div>
            </div>
            <div class="form-actions">
              <div class="form-group">
                <div class="col-sm-offset-5 col-sm-9">
                  <button type="submit" class="btn btn-prev">保存</button>
                  <a class="btn" href="parkoverview">返回</a>
                </div>
              </div>
            </div>
          </div>
        </form:form>
      </div>
    </div>
  </div>
</div>
</div>

</body>
</html>
